<!DOCTYPE HTML>
<html>
<head>
<title>Overflow by HTML5 UP</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<script src="js/jquery.min.js"></script>
<script src="js/jquery.poptrox-2.2.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/init.js"></script>
<link rel="stylesheet" href="css/skel-noscript.css" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body>

	<!-- Header -->
	<section id="header">
		<header>
			<h1>Time Axis</h1>
			<p>By HTML5 UP</p>
		</header>
		<footer>
			<a href="#banner" class="button style2 scrolly">Proceed as
				anticipated</a>
		</footer>
	</section>

	<!-- Banner -->
	<section id="banner">
		<header>
			<h2>时光轴标题</h2>
		</header>
		<p>时光轴简介</p>
		<footer>
			<a href="#first" class="button style2 scrolly">Act on this Axis</a>
		</footer>
	</section>
	<div class="copyrights">
		Collect from <a href="http://www.cssmoban.com/">网页模板</a>
	</div>

	<!-- Feature By For -->

	<article id="first" class="container box style1 right">
		<a
			href="http://ineedchemicalx.deviantart.com/art/Time-goes-by-too-fast-335982438"
			class="image full"><img src="images/pic01.jpg" alt="" /></a>
		<div class="inner">
			<header>
				<h2>
					叶片标题<br /> 标题时间
				</h2>
			</header>
			<p>标题简介</p>
		</div>
	</article>


	<!-- Portfolio -->
	<article class="container box style2">
		<header>
			<h2>Magnis parturient</h2>
			<p>
				Justo phasellus et aenean dignissim<br /> placerat cubilia purus
				lectus.
			</p>
		</header>
		<div class="inner gallery">
			<div class="row flush">
				<div class="3u">
					<a href="images/fulls/01.jpg" class="image full"><img
						src="images/thumbs/01.jpg" alt="" title="Ad infinitum" /></a>
				</div>
				<div class="3u">
					<a href="images/fulls/02.jpg" class="image full"><img
						src="images/thumbs/02.jpg" alt="" title="Dressed in Clarity" /></a>
				</div>
				<div class="3u">
					<a href="images/fulls/03.jpg" class="image full"><img
						src="images/thumbs/03.jpg" alt="" title="Raven" /></a>
				</div>
				<div class="3u">
					<a href="images/fulls/04.jpg" class="image full"><img
						src="images/thumbs/04.jpg" alt=""
						title="I'll have a cup of Disneyland, please" /></a>
				</div>
			</div>
			<div class="row flush">
				<div class="3u">
					<a href="images/fulls/05.jpg" class="image full"><img
						src="images/thumbs/05.jpg" alt="" title="Cherish" /></a>
				</div>
				<div class="3u">
					<a href="images/fulls/06.jpg" class="image full"><img
						src="images/thumbs/06.jpg" alt="" title="Different." /></a>
				</div>
				<div class="3u">
					<a href="images/fulls/07.jpg" class="image full"><img
						src="images/thumbs/07.jpg" alt="" title="History was made here" /></a>
				</div>
				<div class="3u">
					<a href="images/fulls/08.jpg" class="image full"><img
						src="images/thumbs/08.jpg" alt=""
						title="People come and go and walk away" /></a>
				</div>
			</div>
		</div>
	</article>

	<section id="footer">
		<ul class="icons">
			<li><a class="icon icon-user solo"
				href="http://ojbk.net/center/login.do?cname=SSGZ"><span>登录</span></a></li>
			<!-- <li><a class="icon icon-apple solo" ><span>注册</span></a></li>
			<li><a class="icon icon-edit solo"><span>批量管理</span></a></li> -->
			<li><a class="icon icon-compass solo" onclick="modifyMsgPw()"><span>修改密码</span></a></li>
			<!-- <li><a class="icon icon-book solo"><span>评论权限管理</span></a></li>
			<li><a class="icon icon-lock solo"><span>展示权限管理</span></a></li> -->
			<li><a class="icon icon-book solo" href="publishTime.html"></a></li>
		</ul>
		<div class="copyright">
			<p>
				Copyright © <a href="#">师易时光印记空间 - 时光轴</a> 2018. OJBK <a
					title="师易信息科技有限公司" href="http://ojbk.net/center" target="_blank">师易信息科技有限公司</a>
			</p>
		</div>
	</section>


	<!-- js获取 url参数 -->
	<script type="text/javascript">

	 	$(function () {
			// 获取地址
			var value = getParValue(window.location.href, "a");
			console.log(xx)
		});
	 	
	 	function getParValue(str, key) {
	 		var num = str.indexOf("?");
	 	    // 截取参数部分
	 	    str=str.substr(num+1); //取得所有参数   stringvar.substr(start [, length ]
			
	 	    var arr = str.split("&"); //各个参数放到数组里
	 	    console.log(arr);
	 	    var tempPar;
	 	    for(var i=0;i < arr.length;i++){
	 	    	tempPar = arr[i].split("=");
	 		   if (tempPar[0] == key)
	 			   return tempPar[1];
	 	    }
	 	    return null;
	 	}
	
	</script>




	<script type="text/javascript">
			function login() {
				var userId = prompt('请出入用户名:');
				if (userId == '' || str == null) {
					alert('请入正确的账号。');
					return ;
				}
				var userPW = prompt('请输入密码:');
				if (userPW == '' || str == null {
					alert('请入正确的密码。');
					return ;
				} 
				$.ajax({    
                    url:"LoginAndRegisterServlet", // URL 目标
                    data: {
                    	type: 'login',
                    	userId: userId,
                    	userPW: userPW
                    },
                    type:"POST", 
                    cache:false,
                    dataType:'json',
                    success:function(data){ // 成功调用
                    	var json = data;
                    	// JSON.stringify(data) // 查看 String 代码
                    	if (json.status) {
                    		alert("登录成功。");
                    		// window.location.href='.' + Pw ;
                    		window.location.reload();
                    	}
                    	else {
                    		alert("密码错误。");
                    	}
                    },
                    error:function(er){
                    	alter(er);
                    }
                });
			}

			// register
			function register() {
				var userId = prompt('请出入用户名:');
				if (userId == '' || str == null) {
					alert('请入正确的账号。');
					return ;
				}
				var userPW = prompt('请输入密码:');
				if (userPW == '' || str == null) {
					alert('请入正确的密码。');
					return ;
				} 
				$.ajax({    
                    url:"LoginAndRegisterServlet", // URL 目标
                    data: {
                    	type: 'register',
                    	userId: userId,
                    	userPW: userPW
                    },
                    type:"POST", 
                    cache:false,
                    dataType:'json',
                    success:function(data){ // 成功调用
                    	var json = data;
                    	if (json.status) {
                    		alert("注册成功。");
                    	}
                    	else{
                    		alert("注册失败。");
                    	}
                    },
                    error:function(er){
                    	alter(er);
                    }
                });
			}
			
			// modifyMsgPw
			function modifyMsgPw() {
				var str = prompt('请输入你的新密码:');
				if (str == '' || str == null) {
					alert('请正确进行输入。');
					return ;
				}
				$.ajax({    
                    url:"timeAxisServlet", // URL 目标
                    data: {
                    	type: 'modifyMsgPw',
                    	newPw: str,
                    	axisId: <%= timeAxisInfo.getAxisId() %>
                    },
                    type:"POST", 
                    cache:false,
                    dataType:'json',
                    success:function(data){ // 成功调用
                    	var json = data;
                    	if (json.status) {
                    		alert("修改成功。");
                    	}
                    	else{
                    		alert("修改失败。");
                    	}
                    },
                    error:function(er){
                    	alter(er);
                    }
                });
			}
		</script>
</body>
</html>